package common;

/**
 * @author Or Kaplan
 * a container for the single logger for all application
 */
public class Logger {
	private static ILogger logger = null;
	
	/**
	 * set the logger for the first use
	 * @param logger
	 */
	public static void SetLogger(ILogger logger)
	{
		Logger.logger = logger;
	}
	
	/**
	 * @return active logger
	 */
	public static ILogger GetLogger()
	{
		if (logger == null)
			throw new NullPointerException("Logger is not initialized");
		return logger;
	}
}
